﻿using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;

namespace FftSharp.Tests;

class Value
{

    [Test]
    public void Test_FFT_ValuesMatchNumpy()
    {
        // Some sample audio data was analyzed with Numpy in Python.
        // This module contains the output of numpy.fft.fft()
        // https://numpy.org/doc/1.18/reference/generated/numpy.fft.fft.html
        // This test assserts our FFT results match Numpy's

        System.Numerics.Complex[] fft = FftSharp.FFT.Forward(audio);
        for (int i = 0; i < fft.Length; i++)
        {
            Assert.AreEqual(numpyFFT[i].Real, fft[i].Real, 1e-12);
            Assert.AreEqual(numpyFFT[i].Imaginary, fft[i].Imaginary, 1e-12);
        }
    }

    [Test]
    public void Test_RFFT_ValuesMatchNumpy()
    {
        // Some sample audio data was analyzed with Numpy in Python.
        // This module contains the output of numpy.fft.rfft()
        // https://numpy.org/doc/1.18/reference/generated/numpy.fft.rfft.html
        // This test assserts our FFT results match Numpy's

        System.Numerics.Complex[] spectrum = FftSharp.FFT.ForwardReal(audio);

        Assert.AreEqual(NumpyRFFT.Length, spectrum.Length);

        for (int i = 0; i < spectrum.Length; i++)
        {
            Assert.AreEqual(NumpyRFFT[i].Real, spectrum[i].Real, 1e-12);
            Assert.AreEqual(NumpyRFFT[i].Imaginary, spectrum[i].Imaginary, 1e-12);
        }
    }

    [Test]
    public void Test_Absolute_ValuesMatchNumpy()
    {
        // Some sample audio data was analyzed with Numpy in Python.
        // This module contains the output of numpy.fft.rfft()
        // https://numpy.org/doc/1.18/reference/generated/numpy.fft.rfft.html
        // This test assserts our FFT results match Numpy's

        System.Numerics.Complex[] real = FftSharp.FFT.ForwardReal(audio);
        double[] magnitudes = real.Select(x => x.Magnitude).ToArray();

        Assert.AreEqual(NumpyRFFTabs.Length, magnitudes.Length);

        for (int i = 0; i < NumpyRFFTabs.Length; i++)
        {
            Assert.AreEqual(NumpyRFFTabs[i], magnitudes[i], 1e-12);
        }
    }

    [Test]
    public void Test_FFTfast_ValuesMatchNumpy()
    {
        // Some sample audio data was analyzed with Numpy in Python.
        // This module contains the output of numpy.fft.fft()
        // https://numpy.org/doc/1.18/reference/generated/numpy.fft.fft.html
        // This test assserts our FFT results match Numpy's

        System.Numerics.Complex[] fft = new System.Numerics.Complex[audio.Length];
        for (int i = 0; i < audio.Length; i++)
            fft[i] = new(audio[i], 0);
        FftSharp.FFT.Forward(fft);

        for (int i = 0; i < fft.Length; i++)
        {
            Assert.AreEqual(numpyFFT[i].Real, fft[i].Real, 1e-12);
            Assert.AreEqual(numpyFFT[i].Imaginary, fft[i].Imaginary, 1e-12);
        }
    }

    [Test]
    public void Test_FftFromDoubleArray_MatchesFftResult()
    {
        // Some sample audio data was analyzed with Numpy in Python.
        // This module contains the output of numpy.fft.fft()
        // https://numpy.org/doc/1.18/reference/generated/numpy.fft.fft.html
        // This test assserts our FFT results match Numpy's

        System.Numerics.Complex[] fft = new System.Numerics.Complex[audio.Length];
        for (int i = 0; i < audio.Length; i++)
            fft[i] = new(audio[i], 0);
        FftSharp.FFT.Forward(fft);

        System.Numerics.Complex[] fft2 = FftSharp.FFT.Forward(audio);

        for (int i = 0; i < fft.Length; i++)
        {
            Assert.AreEqual(fft[i].Real, fft2[i].Real, 1e-12);
            Assert.AreEqual(fft[i].Imaginary, fft2[i].Imaginary, 1e-12);
        }
    }

    private readonly double[] audio =
    {
        0.330, 2.150, 1.440, 1.370, 0.240, 2.600, 3.510, 1.980, 1.880, 0.080,
        1.820, 1.300, 0.230, -1.160, -1.350, -0.580, -0.840, -1.350, -2.720, -2.530,
        -0.020, -0.760, -0.480, -2.100, 0.300, 1.860, 1.600, 1.490, 0.580, 2.120,
        2.790, 1.990, 1.200, 0.800, 2.180, 1.600, -0.370, -1.250, -1.990, 0.350,
        -1.190, -1.620, -3.280, -2.570, 0.070, -0.810, -1.130, -1.680, -0.250, 1.550,
        1.080, 1.530, 0.650, 2.530, 2.790, 2.420, 1.720, 0.540, 2.390, 1.510,
        0.220, -1.420, -1.440, 0.290, -1.610, -1.500, -3.230, -2.200, -0.010, -1.390,
        -0.470, -1.650, 0.250, 2.050, 1.480, 0.910, 0.760, 2.760, 2.730, 2.450,
        1.090, 0.280, 2.070, 1.160, 0.270, -1.170, -1.500, 0.200, -0.910, -1.580,
        -2.460, -2.550, -0.310, -0.940, -1.130, -1.850, 0.420, 1.560, 0.850, 0.880,
        0.660, 2.730, 3.230, 2.470, 1.120, 0.740, 1.600, 1.730, 0.280, -1.540,
        -2.180, -0.500, -1.090, -1.390, -2.910, -2.690, -0.160, -1.040, -1.240, -1.520,
        -0.390, 1.690, 1.520, 0.870, 0.310, 2.750, 3.560, 2.530, 1.290, 0.330,
        1.810, 1.340, 0.130, -1.580, -2.050, -0.110, -0.850, -1.730, -3.300, -2.100,
        -0.430, -0.670, -1.340, -1.430, 0.220, 2.160, 1.350, 1.380, 0.210, 2.230,
        3.210, 1.790, 1.900, 0.380, 1.600, 1.100, 0.440, -1.070, -1.690, -0.090,
        -0.730, -2.260, -2.890, -2.680, -0.020, -0.960, -0.890, -1.580, 0.270, 2.330,
        0.970, 0.870, 0.500, 2.520, 2.820, 1.610, 1.130, -0.040, 1.980, 1.280,
        -0.380, -1.240, -1.520, -0.400, -0.790, -2.310, -2.890, -1.880, 0.160, -1.590,
        -0.810, -1.860, 0.570, 1.920, 1.440, 1.130, 0.450, 3.020, 3.490, 2.510,
        1.150, -0.060, 2.430, 1.010, 0.480, -1.090, -1.550, -0.090, -1.350, -1.350,
        -3.370, -2.150, -0.710, -1.410, -0.970, -1.550, -0.140, 1.640, 0.910, 1.590,
        0.170, 2.650, 3.160, 2.200, 1.240, -0.170, 1.630, 1.710, 0.310, -0.740,
        -1.680, -0.350, -1.430, -1.870, -3.200, -1.950, -0.340, -0.970, -1.150, -1.760,
        -0.160, 2.330, 1.280, 0.810, 1.020, 3.000, 2.760, 2.310, 0.990, -0.000,
        1.600, 0.940, 0.330, -1.530, -1.490, 0.040, -1.130, -2.100, -2.560, -1.980,
        -0.390, -0.700, -0.660, -1.670, -0.060, 2.110, 1.090, 1.450, 1.030, 2.650,
        2.690, 2.160, 1.890, 0.680, 2.070, 0.970, -0.400, -1.080, -1.660, -0.230,
        -0.830, -2.020, -2.610, -2.320, -0.000, -1.070, -0.940, -1.970, 0.230, 1.890,
        0.980, 1.060, 0.830, 2.500, 3.520, 1.880, 1.090, -0.040, 2.190, 1.040,
        0.130, -1.120, -1.560, -0.120, -1.600, -1.900, -3.280, -1.980, -0.270, -0.900,
        -0.830, -2.120, 0.170, 1.790, 1.660, 0.930, 0.150, 2.320, 3.230, 2.340,
        1.150, 0.070, 1.550, 1.280, -0.110, -0.790, -1.510, -0.080, -0.750, -2.140,
        -2.450, -1.990, 0.060, -1.140, -0.620, -1.780, 0.150, 1.640, 1.090, 1.200,
        0.450, 2.700, 3.200, 2.470, 1.810, 0.110, 2.210, 1.180, 0.070, -0.830,
        -2.120, 0.300, -1.180, -1.480, -2.450, -2.570, -0.340, -1.280, -1.280, -1.870,
        0.220, 1.920, 1.580, 1.170, 0.790, 2.830, 2.720, 1.640, 1.510, 0.440,
        2.100, 1.650, 0.460, -1.390, -1.960, -0.010, -1.040, -2.260, -2.870, -1.850,
        -0.670, -1.130, -1.400, -1.980, 0.590, 1.370, 1.000, 0.840, 0.550, 2.610,
        3.460, 1.760, 1.020, -0.040, 2.310, 1.670, 0.350, -1.390, -2.160, -0.480,
        -1.520, -1.760, -2.670, -2.010, -0.600, -1.210, -1.420, -1.850, 0.080, 1.690,
        1.270, 1.220, 0.830, 2.230, 2.700, 1.680, 1.420, 0.560, 1.910, 1.550,
        0.060, -1.550, -1.750, -0.570, -0.920, -1.990, -2.700, -2.130, -0.370, -1.060,
        -0.630, -1.710, 0.510, 1.740, 1.480, 1.390, 0.780, 2.270, 3.520, 2.130,
        1.890, -0.140, 2.080, 0.990, 0.570, -1.190, -1.900, 0.320, -1.640, -1.700,
        -3.090, -1.840, 0.030, -1.150, -0.800, -2.040, 0.590, 2.020, 0.720, 1.690,
        0.730, 2.380, 3.420, 2.480, 1.420, -0.010, 2.040, 1.220, -0.020, -1.110,
        -1.950, -0.320, -0.870, -1.550, -2.670, -2.440, -0.300, -1.180, -1.390, -1.800,
        0.520, 2.110, 1.320, 1.630, 0.270, 2.880, 3.160, 1.990, 1.640, 0.530,
        2.120, 0.900, -0.220, -1.590, -1.450, 0.050, -1.460, -1.730, -2.760, -2.060,
        0.100, -1.560, -0.920, -1.600, -0.140, 1.350, 0.830, 0.880, 0.760, 2.300,
        3.160, 2.110,
    };

    // generated with python/Numpy: fft = numpy.fft.fft(sampleAudio1)
    private readonly System.Numerics.Complex[] numpyFFT =
    {
        new(71.52, 0.0),
        new(16.292599219664993, -1.650266240953031),
        new(16.58819220541474, -4.456837908626264),
        new(11.867798701774102, 0.7429551118770812),
        new(6.339252942386048, 1.3944730123175706),
        new(5.091353556901778, -4.23187134652945),
        new(18.814490506606102, -8.665625451587731),
        new(16.81258122144206, 1.5049383063313775),
        new(16.250262936175652, -10.898983835764772),
        new(9.653138749580403, -3.4907810508138843),
        new(13.307669165815344, -4.967069973560199),
        new(14.963784782916647, -12.000161985633959),
        new(11.96745034011839, -6.99870154432028),
        new(20.457611574040772, -7.503111641685473),
        new(16.65888595885314, -13.091972828691972),
        new(21.507612856521956, -0.699201769934322),
        new(26.771895548958383, -16.35220257819907),
        new(31.077223230796143, -16.494436421460076),
        new(45.10852008979767, -20.58984095476262),
        new(59.25922110005847, -29.04396354790871),
        new(94.30531062507758, -51.976078289996565),
        new(366.88585732605077, -205.12349027793272),
        new(-177.8491671506428, 105.09540721761974),
        new(-71.83350266181674, 50.22287606700222),
        new(-45.553168448188615, 26.10712988794811),
        new(-20.986245062901816, 15.999954756852027),
        new(-24.858594932136125, 13.645918510329325),
        new(-19.173373012705525, 16.449007609589398),
        new(-8.537098037860998, 8.88530912169331),
        new(-11.266585527651117, 8.094594399106153),
        new(-9.241923204154396, -1.847317739378453),
        new(-10.46615838300978, 4.64345496924585),
        new(-12.27027085039127, 5.87765864860703),
        new(-7.370274298222351, 6.341810090314409),
        new(-1.2131051366901628, 6.993893647840464),
        new(-6.1359988292690755, 7.692984484782312),
        new(4.091706423869168, 1.365798023974214),
        new(-4.655458008198221, -0.7217109700711242),
        new(-4.463444898038833, 2.2094751854192),
        new(-2.4342160634907675, 11.254011503392162),
        new(5.098783312195228, 4.827669742579822),
        new(-5.831778282084546, 4.025856294966041),
        new(3.665136034495667, 5.806578149334394),
        new(-6.782761994698575, 12.087457969879013),
        new(-0.454577044366566, 8.989165374120152),
        new(1.1190972614148489, 7.3826047223482005),
        new(-5.300512604596365, 3.3787295501896804),
        new(-5.303638228818758, 0.663150420740581),
        new(-1.402392307772061, 4.385841205789253),
        new(2.839320733358291, 6.177222092996357),
        new(-5.471846454174141, -3.646041429888425),
        new(-0.1825607735763244, 4.335020541082649),
        new(0.23366490444061006, 12.53115614224979),
        new(-4.607834909859168, 2.731226568868507),
        new(0.4407190353942614, 5.867753191224533),
        new(-0.6346634815558851, 5.2502903349451495),
        new(-4.644687701252085, 13.308500752662315),
        new(-4.186255039897505, 1.883033665479715),
        new(3.1011324895272105, 6.889303301004),
        new(-5.994624072627106, 3.0893738437673104),
        new(2.148665980983523, -2.165175261206472),
        new(8.120784577044827, -1.026413324380261),
        new(-2.736075709061385, 8.309850036461317),
        new(-1.122976392687268, 1.3868358039512898),
        new(-0.4420963209812834, 3.394939033455901),
        new(10.571135745703966, -7.214497105214868),
        new(-0.6361813663828921, 6.457986031215809),
        new(-0.0025957626844732573, 9.037941129554671),
        new(-2.797973427324928, -1.3949959065210518),
        new(0.32042128744426146, 5.166759010512948),
        new(1.8672167221767477, 3.7484970064639),
        new(4.284785289539634, 11.97800470285899),
        new(-1.9130289340345799, 4.890086838063299),
        new(-8.063646970616297, 7.70671282524425),
        new(-2.5076616550924244, -0.5616066179697525),
        new(4.848590964002215, 0.4155821028619835),
        new(0.6519047716752894, 8.365467739744268),
        new(5.925896594814173, 1.6214148805227862),
        new(-0.11732472297714991, 2.084514460872517),
        new(3.1379824354268417, -6.2577633910536195),
        new(6.774385287871493, 9.629330590835693),
        new(5.4393155868096645, -6.121406497914311),
        new(1.0174178671562233, -8.607714904038465),
        new(5.398310408984056, -7.203490766128718),
        new(-3.785148744276335, 3.9182113455816534),
        new(7.557346542357081, 6.081240307670624),
        new(-8.76993242973248, 5.33687737351268),
        new(-0.30138424584816725, 2.3135609200854255),
        new(6.9465856216898105, 8.502927040297298),
        new(-8.363128478889873, 9.156259453584855),
        new(9.67066074018313, 4.95686087152842),
        new(8.861238026483612, -0.9840687253038303),
        new(10.426812822364912, -3.327862985228994),
        new(7.296132588971696, 4.341249905128431),
        new(2.513188500291645, 5.861603466455876),
        new(-1.0480377808580927, 3.4893475665297666),
        new(7.821845003550149, -1.9841378599467063),
        new(-1.6324823820087873, 7.790777253754385),
        new(8.970903795772337, 4.066014902164978),
        new(-1.6707970781871344, 2.136015162752384),
        new(7.25823248662058, 2.7652788765225464),
        new(18.74397062908053, 8.896718444008549),
        new(2.1660703208919037, -0.16068219834732878),
        new(13.825097858675338, 8.427493951505237),
        new(18.47832853222178, 12.667650849412713),
        new(37.569125833815264, 21.578994508186412),
        new(90.94566028906655, 50.697370827337764),
        new(-191.4717302736666, -117.08331011378777),
        new(-51.32832640613284, -23.124699639369688),
        new(-23.500774862545306, -12.60161060026162),
        new(-23.59827162418354, -16.220434411970672),
        new(-21.623922884263543, -12.128429398236538),
        new(-8.156016294103669, -2.0796298320611637),
        new(-3.320934257799828, -4.826944007044764),
        new(-8.966686390330285, 2.8174321266953233),
        new(-4.036510916197747, -8.306905035682055),
        new(-9.118052343426735, -0.7998264524711765),
        new(1.7056006968282986, 2.48014371582694),
        new(-0.4317759856237964, -2.0729669596807687),
        new(1.3875511565884053, -2.3921170941765446),
        new(-7.976980514611284, 4.704983072668933),
        new(-1.0412939420119793, 2.0304346948254044),
        new(-0.4712297547813127, -1.8877908393403056),
        new(-12.834400468053518, -1.928010984003001),
        new(-0.4020716349072191, -4.708004655448063),
        new(-8.267438571150924, -3.7039764685576895),
        new(-4.8684310845372405, -5.189260677129305),
        new(0.4631251388647053, 1.0836107137372681),
        new(0.9899999999999949, -2.049999999999997),
        new(-4.84931978116202, -0.23933081088023878),
        new(-9.934189775670093, 0.7971585720723557),
        new(-2.600011910104527, -0.9923343205338109),
        new(-2.160469164514625, -5.322803319988892),
        new(-8.342213173106142, -0.17252901564132728),
        new(-4.196598202151177, -4.7274680682126755),
        new(-4.944944633762713, -1.4791201736168527),
        new(-6.434479741808574, 6.482812912010042),
        new(-5.158937174706397, 3.713563429843517),
        new(-2.5917604439233597, -1.074410553473996),
        new(1.6430036734162927, -0.26848993074113725),
        new(-4.68619932790007, 3.5540911138722024),
        new(-9.114112417604312, -5.863251584381021),
        new(-1.511010285838398, 0.5916676752843228),
        new(-1.0248996347649997, -5.221535985301575),
        new(-5.907774632673288, 3.6263871521782516),
        new(-0.8134349081877801, -2.8827110905821716),
        new(-3.8883597256888898, 6.5096521647811105),
        new(3.6028695146052687, 4.906754934650181),
        new(-1.43392165399176, 0.09877393185500516),
        new(2.5399337102167436, -2.6091846772843255),
        new(-2.4029291340916004, 4.978313193479735),
        new(-3.715287570789176, -4.39451837716846),
        new(-10.306371528157012, -2.7488670997481837),
        new(-0.024313261096906125, -5.986905188653612),
        new(-2.8298389130063915, 3.448368650672101),
        new(4.7341520993712995, -11.062510314288573),
        new(-5.3829294937018854, -2.783057603406332),
        new(0.0026383233212190493, -0.18978654624226898),
        new(-1.8812828884644066, 4.871022697842905),
        new(-3.2509005555527533, 1.4393838886348913),
        new(-2.3369676800222434, 2.482582201564716),
        new(-1.2142355119041524, 0.1834635506672304),
        new(-9.582245656802916, -0.027020924935291735),
        new(-6.581883483527928, -0.9168370285871652),
        new(2.23633907309973, -2.3021508943840727),
        new(-2.0748219655573625, -2.0037979487038773),
        new(-3.765563906978262, 3.088432721629983),
        new(5.332530718835812, -2.0516059158581865),
        new(-0.2549012255641858, -0.6932903665209049),
        new(-7.277178212857739, 2.9116631246832343),
        new(-2.1936009994012435, 0.4001679051474425),
        new(-8.794157662232939, 3.5717135906207176),
        new(9.191032309546063, -1.9398929261634499),
        new(-3.869682067783085, 0.5152936097585425),
        new(3.147392558038452, 2.216334156350135),
        new(4.337683896574441, 0.82997589223395),
        new(5.8600818792670735, 0.02923610475152838),
        new(-2.7839860346841525, 2.4914655265099466),
        new(-1.903842415258608, 1.4113411741607438),
        new(-9.894054706023422, 4.9668960901740284),
        new(-0.8081382242155792, 11.349170741938877),
        new(8.373197781633165, 2.1638002986517635),
        new(-2.4852724753585846, 4.218258048332267),
        new(-3.755737925182469, -4.490350833996583),
        new(-2.879274257660312, 2.1626921190768043),
        new(0.7024288556739815, -0.03525952952816347),
        new(-2.673777491391463, 2.058724091865224),
        new(2.1942581278786912, -4.751521874754496),
        new(3.8112923807165675, 3.5946006951844867),
        new(4.095532859213184, -0.28973422842765917),
        new(-6.83825512481851, -9.6297170417451),
        new(-1.9910301634396683, -10.188877845696899),
        new(-1.4179036790187196, -3.8050609665441018),
        new(-4.500591208775358, 2.5115489328726808),
        new(2.5605067559698993, -1.0184596329131184),
        new(6.717336341148254, -1.1098887472444834),
        new(-3.6308727316719613, -2.930509025563401),
        new(-1.2800687813817113, -5.2293267918825705),
        new(-0.24178054270822846, -0.34674641143824747),
        new(-3.5825821902320762, -6.877312499750982),
        new(-2.602886071425474, -6.86407264784425),
        new(-1.2785892290938932, -1.6397567663004344),
        new(-8.675100612964963, -7.055963310707158),
        new(8.84974247542792, -6.56325254726892),
        new(2.885016983143895, -6.95362008379264),
        new(6.918222156603157, 9.497082265446183),
        new(4.10405309937396, -7.9120673382156275),
        new(-1.584044627114519, -3.1949874308238275),
        new(0.3670925294266434, -1.6673485244636947),
        new(0.29461814038296197, -10.528089110189706),
        new(10.194833330276264, -7.1146946624422025),
        new(17.627086740678745, -7.638274663697334),
        new(22.6731707587984, -11.536058001405237),
        new(90.79168081510915, -41.13328830004425),
        new(-43.229531626011074, 23.294890907589057),
        new(-17.52387246706339, 7.853673956180025),
        new(-15.806202527275513, -0.5183772215827949),
        new(-25.289765401997723, 13.089544474677414),
        new(-7.587901316147817, 6.612185770225549),
        new(-7.7510301280002984, -4.450483522400161),
        new(3.0154490825863447, 4.85718259595836),
        new(-5.588006589467025, 1.8753775661904744),
        new(-4.522700439505712, -6.941653406278663),
        new(-9.29990757512051, 7.73164297352557),
        new(-15.054606473136637, -4.415621289881546),
        new(-5.649212036777634, -3.004224743561956),
        new(-5.3245866110889075, -2.3232079416455855),
        new(-6.09582893633526, -2.833602503098011),
        new(2.3719671688372457, 7.823224635184997),
        new(-4.378899544434763, -2.1004484536234473),
        new(-1.847804254120236, -1.2174634584260025),
        new(-7.151969645971247, 5.608493469097141),
        new(-6.962043610144818, 2.4741041607524394),
        new(-0.9411822402381276, 6.274216197339793),
        new(0.501900088529041, -4.787955462633128),
        new(-1.1594019555348325, -3.84174782623154),
        new(3.3001766896560056, 2.9594456628498946),
        new(-10.066436810536924, 0.6384104860672224),
        new(-7.19567825040399, -3.2261296085795568),
        new(-4.691470830071458, 2.9464762422417987),
        new(-0.14727201097456977, -4.859280838128437),
        new(-14.56692223701291, -7.90084256027122),
        new(-4.324446487468897, 0.004185311431190719),
        new(-1.0407514948403307, 2.059605296404119),
        new(-2.98340696573519, -3.1029075652331937),
        new(-4.636760771943916, 10.373963334679214),
        new(-8.26960957572124, 0.7354864925759217),
        new(-4.979951151973244, 2.4789920137824786),
        new(1.4400641578399824, 0.8869891013658968),
        new(0.6818750261182362, 2.470099039214686),
        new(8.336841493956832, 7.404955214008821),
        new(2.8157431492244953, -6.567660517080393),
        new(-5.878260543893631, 8.516509649574305),
        new(2.879678032286943, -3.1017131232821384),
        new(-3.801558789466788, -2.7381256767431728),
        new(-0.27745160787512013, -7.4993828895293335),
        new(11.019999999999996, 0.0),
        new(-0.2774516078751077, 7.499382889529332),
        new(-3.801558789466789, 2.738125676743172),
        new(2.8796780322869546, 3.101713123282132),
        new(-5.87826054389363, -8.516509649574308),
        new(2.8157431492244895, 6.567660517080403),
        new(8.336841493956836, -7.404955214008817),
        new(0.6818750261182362, -2.470099039214685),
        new(1.4400641578399824, -0.8869891013658968),
        new(-4.979951151973249, -2.4789920137824777),
        new(-8.269609575721244, -0.7354864925759133),
        new(-4.636760771943918, -10.373963334679196),
        new(-2.9834069657351927, 3.1029075652331986),
        new(-1.0407514948403325, -2.0596052964041296),
        new(-4.324446487468897, -0.004185311431191607),
        new(-14.566922237012907, 7.900842560271221),
        new(-0.14727201097457154, 4.85928083812844),
        new(-4.691470830071458, -2.9464762422418005),
        new(-7.195678250403994, 3.2261296085795585),
        new(-10.066436810536924, -0.6384104860672206),
        new(3.3001766896559985, -2.9594456628499017),
        new(-1.1594019555349178, 3.84174782623154),
        new(0.5019000885290694, 4.787955462633128),
        new(-0.9411822402381276, -6.274216197339783),
        new(-6.962043610144818, -2.4741041607524394),
        new(-7.151969645971249, -5.608493469097138),
        new(-1.8478042541202342, 1.2174634584260051),
        new(-4.378899544434763, 2.100448453623444),
        new(2.3719671688372457, -7.8232246351849986),
        new(-6.09582893633526, 2.833602503098014),
        new(-5.324586611088915, 2.3232079416455873),
        new(-5.649212036777634, 3.0042247435619593),
        new(-15.054606473136637, 4.415621289881546),
        new(-9.299907575120518, -7.731642973525572),
        new(-4.522700439505707, 6.941653406278663),
        new(-5.58800658946703, -1.8753775661904735),
        new(3.015449082586345, -4.85718259595836),
        new(-7.751030128000305, 4.45048352240015),
        new(-7.587901316147819, -6.612185770225553),
        new(-25.289765401997727, -13.089544474677405),
        new(-15.806202527275513, 0.5183772215827931),
        new(-17.523872467063388, -7.853673956180031),
        new(-43.229531626011074, -23.294890907589064),
        new(90.79168081510915, 41.13328830004425),
        new(22.6731707587984, 11.536058001405241),
        new(17.62708674067875, 7.6382746636973495),
        new(10.194833330276262, 7.114694662442204),
        new(0.2946181403829593, 10.528089110189704),
        new(0.3670925294266425, 1.6673485244636956),
        new(-1.584044627114522, 3.1949874308238337),
        new(4.104053099373957, 7.912067338215623),
        new(6.918222156603163, -9.497082265446183),
        new(2.8850169831438968, 6.953620083792638),
        new(8.849742475427908, 6.563252547268917),
        new(-8.675100612964956, 7.0559633107071535),
        new(-1.2785892290938947, 1.6397567663004302),
        new(-2.602886071425475, 6.86407264784425),
        new(-3.5825821902320816, 6.877312499750978),
        new(-0.2417805427082258, 0.346746411438247),
        new(-1.280068781381706, 5.229326791882579),
        new(-3.6308727316719613, 2.930509025563401),
        new(6.717336341148264, 1.1098887472444712),
        new(2.560506755969895, 1.0184596329131175),
        new(-4.500591208775362, -2.511548932872677),
        new(-1.4179036790187196, 3.8050609665441018),
        new(-1.9910301634396674, 10.1888778456969),
        new(-6.838255124818515, 9.629717041745097),
        new(4.095532859213191, 0.28973422842765384),
        new(3.8112923807165693, -3.5946006951844875),
        new(2.194258127878689, 4.751521874754488),
        new(-2.6737774913914603, -2.0587240918652236),
        new(0.7024288556739806, 0.03525952952816347),
        new(-2.8792742576603123, -2.162692119076805),
        new(-3.7557379251824736, 4.490350833996582),
        new(-2.4852724753585793, -4.21825804833226),
        new(8.373197781633138, -2.1638002986517675),
        new(-0.8081382242155787, -11.349170741938874),
        new(-9.894054706023425, -4.966896090174037),
        new(-1.9038424152586149, -1.4113411741607438),
        new(-2.78398603468415, -2.491465526509942),
        new(5.8600818792670735, -0.029236104751530156),
        new(4.337683896574438, -0.8299758922339566),
        new(3.147392558038458, -2.216334156350134),
        new(-3.869682067783092, -0.5152936097585532),
        new(9.191032309546063, 1.9398929261634485),
        new(-8.79415766223292, -3.5717135906207194),
        new(-2.193600999401239, -0.40016790514745004),
        new(-7.277178212857741, -2.911663124683228),
        new(-0.2549012255641854, 0.6932903665209089),
        new(5.3325307188358035, 2.0516059158581808),
        new(-3.765563906978266, -3.0884327216299763),
        new(-2.0748219655573683, 2.0037979487038813),
        new(2.236339073099729, 2.3021508943840754),
        new(-6.581883483527934, 0.9168370285871648),
        new(-9.582245656802918, 0.027020924935293067),
        new(-1.2142355119041532, -0.18346355066723263),
        new(-2.3369676800222434, -2.482582201564716),
        new(-3.2509005555527524, -1.439383888634893),
        new(-1.881282888464412, -4.871022697842905),
        new(0.002638323321221492, 0.18978654624225966),
        new(-5.3829294937018854, 2.7830576034063332),
        new(4.734152099371303, 11.062510314288577),
        new(-2.8298389130063937, -3.448368650672099),
        new(-0.024313261096907013, 5.986905188653619),
        new(-10.306371528157014, 2.7488670997481854),
        new(-3.715287570789169, 4.394518377168463),
        new(-2.402929134091579, -4.978313193479721),
        new(2.539933710216687, 2.609184677284304),
        new(-1.4339216539917672, -0.09877393185499805),
        new(3.602869514605274, -4.906754934650175),
        new(-3.8883597256888915, -6.509652164781107),
        new(-0.8134349081877765, 2.8827110905821733),
        new(-5.907774632673294, -3.6263871521782534),
        new(-1.0248996347650001, 5.221535985301575),
        new(-1.5110102858383998, -0.5916676752843197),
        new(-9.114112417604304, 5.863251584381027),
        new(-4.6861993279000735, -3.5540911138722056),
        new(1.643003673416314, 0.26848993074112837),
        new(-2.5917604439233606, 1.0744105534739878),
        new(-5.1589371747064, -3.713563429843524),
        new(-6.434479741808579, -6.482812912010042),
        new(-4.944944633762709, 1.4791201736168564),
        new(-4.196598202151179, 4.72746806821267),
        new(-8.342213173106137, 0.17252901564131817),
        new(-2.160469164514622, 5.322803319988891),
        new(-2.600011910104522, 0.9923343205338124),
        new(-9.934189775670099, -0.7971585720723513),
        new(-4.8493197811620155, 0.23933081088024055),
        new(0.9899999999999949, 2.049999999999997),
        new(0.46312513886469997, -1.083610713737262),
        new(-4.8684310845372405, 5.189260677129301),
        new(-8.26743857115093, 3.7039764685576912),
        new(-0.4020716349072171, 4.7080046554480655),
        new(-12.834400468053516, 1.9280109840029835),
        new(-0.471229754781314, 1.8877908393403002),
        new(-1.0412939420119778, -2.030434694825405),
        new(-7.976980514611285, -4.704983072668933),
        new(1.3875511565884113, 2.3921170941765437),
        new(-0.43177598562379993, 2.072966959680773),
        new(1.7056006968282746, -2.4801437158269524),
        new(-9.118052343426733, 0.7998264524711733),
        new(-4.03651091619774, 8.306905035682062),
        new(-8.966686390330285, -2.8174321266953237),
        new(-3.3209342577998275, 4.826944007044759),
        new(-8.156016294103669, 2.0796298320611637),
        new(-21.623922884263532, 12.12842939823654),
        new(-23.59827162418354, 16.220434411970665),
        new(-23.5007748625453, 12.601610600261623),
        new(-51.32832640613283, 23.124699639369688),
        new(-191.47173027366654, 117.08331011378777),
        new(90.94566028906652, -50.697370827337764),
        new(37.569125833815264, -21.57899450818642),
        new(18.47832853222178, -12.667650849412711),
        new(13.825097858675331, -8.427493951505243),
        new(2.1660703208919014, 0.160682198347327),
        new(18.743970629080533, -8.896718444008545),
        new(7.258232486620578, -2.765278876522548),
        new(-1.67079707818714, -2.1360151627523862),
        new(8.970903795772342, -4.066014902164978),
        new(-1.63248238200879, -7.790777253754383),
        new(7.821845003550149, 1.9841378599467063),
        new(-1.0480377808580839, -3.489347566529763),
        new(2.5131885002916463, -5.861603466455877),
        new(7.296132588971693, -4.341249905128436),
        new(10.426812822364907, 3.327862985228995),
        new(8.861238026483615, 0.9840687253038444),
        new(9.670660740183134, -4.95686087152842),
        new(-8.363128478889875, -9.156259453584862),
        new(6.946585621689808, -8.5029270402973),
        new(-0.30138424584816637, -2.313560920085428),
        new(-8.769932429732478, -5.336877373512683),
        new(7.557346542357086, -6.081240307670633),
        new(-3.785148744276337, -3.918211345581653),
        new(5.398310408984054, 7.203490766128711),
        new(1.0174178671562275, 8.607714904038463),
        new(5.439315586809667, 6.121406497914306),
        new(6.774385287871493, -9.629330590835693),
        new(3.1379824354268426, 6.257763391053615),
        new(-0.11732472297715368, -2.0845144608725157),
        new(5.925896594814177, -1.6214148805227864),
        new(0.6519047716752884, -8.365467739744261),
        new(4.848590964002236, -0.4155821028619928),
        new(-2.5076616550924316, 0.5616066179697503),
        new(-8.0636469706163, -7.706712825244248),
        new(-1.9130289340345779, -4.890086838063298),
        new(4.2847852895396334, -11.97800470285899),
        new(1.8672167221767484, -3.748497006463906),
        new(0.3204212874442627, -5.166759010512947),
        new(-2.797973427324931, 1.3949959065210518),
        new(-0.002595762684481251, -9.037941129554675),
        new(-0.6361813663828864, -6.4579860312158095),
        new(10.57113574570397, 7.214497105214866),
        new(-0.4420963209812834, -3.394939033455901),
        new(-1.1229763926872622, -1.3868358039512907),
        new(-2.7360757090613825, -8.309850036461313),
        new(8.120784577044823, 1.026413324380274),
        new(2.1486659809835205, 2.165175261206473),
        new(-5.99462407262711, -3.089373843767308),
        new(3.1011324895272074, -6.8893033010039995),
        new(-4.186255039897514, -1.883033665479715),
        new(-4.644687701252083, -13.308500752662315),
        new(-0.6346634815558894, -5.25029033494515),
        new(0.4407190353942614, -5.8677531912245335),
        new(-4.607834909859174, -2.7312265688684985),
        new(0.23366490444060828, -12.531156142249792),
        new(-0.18256077357631373, -4.335020541082644),
        new(-5.471846454174138, 3.6460414298884283),
        new(2.839320733358294, -6.1772220929963595),
        new(-1.402392307772061, -4.385841205789253),
        new(-5.303638228818758, -0.6631504207405765),
        new(-5.3005126045963635, -3.37872955018968),
        new(1.119097261414847, -7.382604722348194),
        new(-0.45457704436656776, -8.989165374120152),
        new(-6.782761994698582, -12.08745796987899),
        new(3.6651360344956814, -5.806578149334387),
        new(-5.831778282084541, -4.025856294966035),
        new(5.098783312195226, -4.827669742579823),
        new(-2.434216063490762, -11.25401150339216),
        new(-4.463444898038834, -2.2094751854191976),
        new(-4.655458008198199, 0.7217109700711257),
        new(4.091706423869164, -1.3657980239742185),
        new(-6.135998829269078, -7.692984484782302),
        new(-1.213105136690158, -6.993893647840464),
        new(-7.3702742982223475, -6.341810090314407),
        new(-12.27027085039127, -5.87765864860703),
        new(-10.466158383009784, -4.64345496924585),
        new(-9.241923204154393, 1.8473177393784537),
        new(-11.266585527651117, -8.094594399106146),
        new(-8.537098037861002, -8.885309121693309),
        new(-19.17337301270554, -16.4490076095894),
        new(-24.85859493213612, -13.64591851032932),
        new(-20.98624506290183, -15.99995475685203),
        new(-45.553168448188615, -26.107129887948112),
        new(-71.83350266181674, -50.22287606700222),
        new(-177.8491671506428, -105.09540721761977),
        new(366.88585732605077, 205.12349027793272),
        new(94.3053106250776, 51.97607828999656),
        new(59.25922110005847, 29.043963547908717),
        new(45.108520089797665, 20.58984095476262),
        new(31.077223230796157, 16.494436421460072),
        new(26.77189554895839, 16.352202578199066),
        new(21.50761285652196, 0.6992017699343238),
        new(16.65888595885314, 13.091972828691969),
        new(20.457611574040776, 7.5031116416854715),
        new(11.967450340118393, 6.99870154432028),
        new(14.963784782916644, 12.000161985633948),
        new(13.307669165815334, 4.967069973560196),
        new(9.653138749580414, 3.490781050813886),
        new(16.250262936175652, 10.898983835764772),
        new(16.81258122144206, -1.5049383063313797),
        new(18.814490506606106, 8.665625451587735),
        new(5.0913535569017805, 4.231871346529461),
        new(6.3392529423860475, -1.3944730123175701),
        new(11.867798701774106, -0.7429551118770841),
        new(16.588192205414742, 4.456837908626263),
        new(16.292599219664993, 1.6502662409530293),
    };

    private readonly System.Numerics.Complex[] NumpyRFFT =
    {
        new(71.52, 0.0),
        new(16.292599219664986, -1.650266240953031),
        new(16.588192205414742, -4.456837908626266),
        new(11.867798701774108, 0.7429551118770739),
        new(6.339252942386047, 1.3944730123175706),
        new(5.091353556901781, -4.231871346529461),
        new(18.8144905066061, -8.665625451587735),
        new(16.81258122144206, 1.5049383063313806),
        new(16.250262936175655, -10.898983835764774),
        new(9.65313874958041, -3.49078105081389),
        new(13.307669165815337, -4.967069973560201),
        new(14.963784782916647, -12.000161985633948),
        new(11.96745034011839, -6.998701544320284),
        new(20.457611574040772, -7.503111641685466),
        new(16.658885958853144, -13.091972828691969),
        new(21.507612856521952, -0.6992017699343278),
        new(26.771895548958383, -16.35220257819907),
        new(31.077223230796147, -16.494436421460072),
        new(45.10852008979767, -20.589840954762618),
        new(59.259221100058475, -29.043963547908714),
        new(94.30531062507757, -51.97607828999656),
        new(366.8858573260508, -205.12349027793277),
        new(-177.84916715064278, 105.09540721761974),
        new(-71.83350266181674, 50.22287606700222),
        new(-45.553168448188615, 26.10712988794811),
        new(-20.986245062901823, 15.999954756852036),
        new(-24.85859493213612, 13.645918510329333),
        new(-19.17337301270553, 16.449007609589387),
        new(-8.537098037861, 8.88530912169331),
        new(-11.266585527651117, 8.094594399106143),
        new(-9.241923204154396, -1.8473177393784619),
        new(-10.466158383009773, 4.643454969245847),
        new(-12.27027085039127, 5.877658648607031),
        new(-7.370274298222345, 6.341810090314407),
        new(-1.213105136690162, 6.993893647840459),
        new(-6.1359988292690755, 7.692984484782306),
        new(4.091706423869168, 1.3657980239742202),
        new(-4.655458008198215, -0.7217109700711151),
        new(-4.4634448980388335, 2.2094751854191967),
        new(-2.434216063490762, 11.25401150339216),
        new(5.098783312195228, 4.827669742579822),
        new(-5.831778282084553, 4.025856294966037),
        new(3.6651360344956743, 5.806578149334403),
        new(-6.782761994698575, 12.087457969879019),
        new(-0.45457704436657487, 8.989165374120159),
        new(1.1190972614148507, 7.382604722348191),
        new(-5.300512604596362, 3.378729550189676),
        new(-5.3036382288187545, 0.6631504207405756),
        new(-1.402392307772061, 4.385841205789253),
        new(2.8393207333582873, 6.177222092996363),
        new(-5.471846454174142, -3.6460414298884287),
        new(-0.1825607735763195, 4.335020541082642),
        new(0.23366490444060628, 12.531156142249785),
        new(-4.607834909859171, 2.7312265688685136),
        new(0.4407190353942596, 5.867753191224537),
        new(-0.6346634815558827, 5.250290334945159),
        new(-4.644687701252086, 13.308500752662315),
        new(-4.186255039897507, 1.883033665479711),
        new(3.101132489527204, 6.889303301004002),
        new(-5.9946240726271025, 3.0893738437673117),
        new(2.148665980983527, -2.1651752612064716),
        new(8.120784577044823, -1.0264133243802687),
        new(-2.7360757090613825, 8.309850036461313),
        new(-1.1229763926872607, 1.3868358039512911),
        new(-0.4420963209812834, 3.394939033455901),
        new(10.571135745703966, -7.214497105214872),
        new(-0.6361813663828926, 6.457986031215812),
        new(-0.0025957626844785864, 9.037941129554667),
        new(-2.79797342732493, -1.3949959065210513),
        new(0.3204212874442537, 5.1667590105129415),
        new(1.8672167221767446, 3.7484970064638996),
        new(4.284785289539631, 11.978004702858989),
        new(-1.9130289340345774, 4.890086838063301),
        new(-8.0636469706163, 7.706712825244253),
        new(-2.507661655092423, -0.5616066179697499),
        new(4.848590964002231, 0.4155821028619948),
        new(0.6519047716752902, 8.365467739744261),
        new(5.925896594814184, 1.6214148805227837),
        new(-0.11732472297715268, 2.084514460872518),
        new(3.1379824354268404, -6.257763391053611),
        new(6.774385287871493, 9.629330590835693),
        new(5.4393155868096645, -6.121406497914308),
        new(1.017417867156226, -8.607714904038467),
        new(5.398310408984063, -7.203490766128716),
        new(-3.7851487442763334, 3.9182113455816596),
        new(7.557346542357088, 6.08124030767064),
        new(-8.769932429732474, 5.336877373512683),
        new(-0.3013842458481659, 2.313560920085437),
        new(6.946585621689808, 8.502927040297298),
        new(-8.363128478889877, 9.156259453584862),
        new(9.670660740183127, 4.956860871528423),
        new(8.861238026483619, -0.9840687253038265),
        new(10.426812822364909, -3.3278629852289914),
        new(7.296132588971698, 4.341249905128432),
        new(2.513188500291643, 5.861603466455874),
        new(-1.048037780858094, 3.489347566529764),
        new(7.821845003550148, -1.984137859946705),
        new(-1.6324823820087966, 7.790777253754383),
        new(8.970903795772337, 4.066014902164974),
        new(-1.6707970781871395, 2.136015162752383),
        new(7.2582324866205825, 2.765278876522548),
        new(18.743970629080543, 8.896718444008545),
        new(2.1660703208919028, -0.16068219834732655),
        new(13.825097858675331, 8.427493951505237),
        new(18.478328532221784, 12.667650849412713),
        new(37.569125833815264, 21.578994508186412),
        new(90.94566028906652, 50.697370827337764),
        new(-191.47173027366662, -117.0833101137878),
        new(-51.32832640613284, -23.124699639369688),
        new(-23.500774862545306, -12.601610600261623),
        new(-23.598271624183546, -16.220434411970665),
        new(-21.623922884263536, -12.128429398236536),
        new(-8.156016294103667, -2.079629832061165),
        new(-3.3209342577998284, -4.826944007044762),
        new(-8.966686390330285, 2.8174321266953246),
        new(-4.036510916197741, -8.306905035682057),
        new(-9.118052343426735, -0.7998264524711769),
        new(1.705600696828284, 2.4801437158269257),
        new(-0.4317759856237946, -2.0729669596807727),
        new(1.3875511565884089, -2.3921170941765446),
        new(-7.976980514611284, 4.704983072668934),
        new(-1.0412939420119758, 2.0304346948254097),
        new(-0.471229754781314, -1.8877908393403056),
        new(-12.834400468053524, -1.9280109840030062),
        new(-0.40207163490721864, -4.708004655448063),
        new(-8.26743857115093, -3.7039764685576984),
        new(-4.868431084537242, -5.189260677129303),
        new(0.4631251388647035, 1.0836107137372712),
        new(0.9899999999999949, -2.049999999999997),
        new(-4.849319781162014, -0.2393308108802369),
        new(-9.934189775670095, 0.7971585720723549),
        new(-2.6000119101045227, -0.9923343205338122),
        new(-2.1604691645146215, -5.322803319988891),
        new(-8.342213173106131, -0.17252901564132417),
        new(-4.19659820215117, -4.727468068212671),
        new(-4.944944633762708, -1.4791201736168522),
        new(-6.434479741808575, 6.482812912010042),
        new(-5.1589371747063995, 3.7135634298435116),
        new(-2.5917604439233606, -1.0744105534739985),
        new(1.6430036734163007, -0.2684899307411228),
        new(-4.686199327900066, 3.554091113872207),
        new(-9.114112417604307, -5.863251584381021),
        new(-1.5110102858383967, 0.5916676752843237),
        new(-1.0248996347650015, -5.221535985301577),
        new(-5.90777463267329, 3.6263871521782503),
        new(-0.8134349081877801, -2.882711090582175),
        new(-3.8883597256888844, 6.509652164781103),
        new(3.6028695146052705, 4.9067549346501815),
        new(-1.43392165399176, 0.0987739318549945),
        new(2.539933710216701, -2.609184677284297),
        new(-2.4029291340916075, 4.978313193479746),
        new(-3.7152875707891617, -4.394518377168467),
        new(-10.306371528157012, -2.7488670997481854),
        new(-0.02431326109690435, -5.986905188653616),
        new(-2.829838913006398, 3.4483686506720996),
        new(4.734152099371297, -11.06251031428857),
        new(-5.382929493701886, -2.783057603406332),
        new(0.0026383233212212698, -0.18978654624226154),
        new(-1.881282888464411, 4.871022697842906),
        new(-3.25090055555276, 1.439383888634893),
        new(-2.3369676800222425, 2.4825822015647154),
        new(-1.2142355119041537, 0.18346355066723175),
        new(-9.582245656802915, -0.02702092493529351),
        new(-6.581883483527932, -0.9168370285871694),
        new(2.2363390730997272, -2.3021508943840754),
        new(-2.0748219655573523, -2.0037979487038737),
        new(-3.7655639069782607, 3.0884327216299807),
        new(5.332530718835811, -2.05160591585819),
        new(-0.2549012255641827, -0.6932903665209045),
        new(-7.277178212857729, 2.9116631246832334),
        new(-2.19360099940124, 0.40016790514743894),
        new(-8.794157662232948, 3.571713590620707),
        new(9.191032309546067, -1.9398929261634494),
        new(-3.869682067783092, 0.5152936097585563),
        new(3.1473925580384554, 2.2163341563501353),
        new(4.3376838965744415, 0.829975892233958),
        new(5.8600818792670735, 0.029236104751530156),
        new(-2.7839860346841467, 2.4914655265099475),
        new(-1.9038424152586106, 1.4113411741607425),
        new(-9.894054706023423, 4.966896090174032),
        new(-0.8081382242155761, 11.349170741938874),
        new(8.373197781633154, 2.163800298651763),
        new(-2.4852724753585824, 4.218258048332261),
        new(-3.755737925182478, -4.490350833996587),
        new(-2.8792742576603123, 2.1626921190768047),
        new(0.7024288556739773, -0.035259529528166134),
        new(-2.673777491391459, 2.058724091865225),
        new(2.194258127878678, -4.751521874754496),
        new(3.8112923807165657, 3.594600695184486),
        new(4.095532859213183, -0.28973422842766006),
        new(-6.838255124818513, -9.629717041745101),
        new(-1.9910301634396719, -10.188877845696904),
        new(-1.4179036790187196, -3.8050609665441018),
        new(-4.500591208775357, 2.5115489328726808),
        new(2.5605067559698993, -1.0184596329131206),
        new(6.717336341148265, -1.109888747244478),
        new(-3.630872731671961, -2.9305090255634014),
        new(-1.2800687813817038, -5.229326791882572),
        new(-0.2417805427082249, -0.34674641143824525),
        new(-3.582582190232076, -6.877312499750984),
        new(-2.6028860714254742, -6.864072647844253),
        new(-1.278589229093891, -1.639756766300434),
        new(-8.67510061296496, -7.05596331070716),
        new(8.849742475427906, -6.5632525472689105),
        new(2.8850169831438945, -6.953620083792635),
        new(6.918222156603155, 9.497082265446181),
        new(4.104053099373963, -7.912067338215625),
        new(-1.5840446271145168, -3.1949874308238315),
        new(0.3670925294266435, -1.6673485244636947),
        new(0.2946181403829611, -10.528089110189708),
        new(10.194833330276262, -7.114694662442203),
        new(17.62708674067874, -7.638274663697333),
        new(22.6731707587984, -11.536058001405237),
        new(90.79168081510915, -41.13328830004425),
        new(-43.22953162601108, 23.29489090758906),
        new(-17.523872467063395, 7.853673956180025),
        new(-15.806202527275513, -0.5183772215827918),
        new(-25.289765401997723, 13.089544474677407),
        new(-7.587901316147816, 6.612185770225552),
        new(-7.751030128000307, -4.450483522400161),
        new(3.0154490825863447, 4.857182595958358),
        new(-5.58800658946703, 1.8753775661904708),
        new(-4.522700439505712, -6.9416534062786655),
        new(-9.299907575120514, 7.73164297352557),
        new(-15.054606473136637, -4.415621289881547),
        new(-5.649212036777629, -3.004224743561953),
        new(-5.324586611088913, -2.3232079416455873),
        new(-6.095828936335264, -2.8336025030980143),
        new(2.3719671688372443, 7.8232246351849986),
        new(-4.378899544434765, -2.1004484536234376),
        new(-1.8478042541202289, -1.2174634584260051),
        new(-7.151969645971242, 5.608493469097139),
        new(-6.962043610144821, 2.474104160752436),
        new(-0.9411822402381418, 6.274216197339786),
        new(0.5019000885290552, -4.787955462633121),
        new(-1.159401955534861, -3.8417478262315257),
        new(3.3001766896560056, 2.9594456628498946),
        new(-10.06643681053692, 0.638410486067226),
        new(-7.195678250403994, -3.226129608579562),
        new(-4.691470830071456, 2.946476242241795),
        new(-0.14727201097456977, -4.85928083812844),
        new(-14.566922237012909, -7.900842560271224),
        new(-4.3244464874689, 0.004185311431188055),
        new(-1.040751494840329, 2.0596052964041256),
        new(-2.9834069657351936, -3.1029075652331937),
        new(-4.636760771943913, 10.373963334679232),
        new(-8.269609575721237, 0.7354864925759204),
        new(-4.9799511519732516, 2.478992013782473),
        new(1.4400641578399807, 0.8869891013658959),
        new(0.6818750261182345, 2.4700990392146815),
        new(8.336841493956832, 7.404955214008821),
        new(2.815743149224481, -6.567660517080393),
        new(-5.87826054389363, 8.516509649574305),
        new(2.8796780322869413, -3.1017131232821358),
        new(-3.801558789466787, -2.7381256767431754),
        new(-0.2774516078751166, -7.499382889529337),
        new(11.019999999999996, 0.0),
    };

    public readonly double[] NumpyFFTabs =
    {
        71.52, 16.375963116673706, 17.17648173484752, 11.891031423896557, 6.490815268487635,
        6.620469479950298, 20.714200865357473, 16.87980232803245, 19.56678037253717, 10.264922798704918,
        14.204430391572757, 19.18120806182192, 13.863682445500215, 21.79014813217026, 21.187690623031177,
        21.518975205643688, 31.370829132217686, 35.183238006163165, 49.58548310981855, 65.99399293843238,
        107.68010181319585, 420.33424624894946, 206.58018025554776, 87.64924064192853, 52.50403209902302,
        26.389790337580983, 28.3577297044487, 25.262384765193378, 12.32196255050698, 13.872937970664985,
        9.424740173697616, 11.44998451307511, 13.60538194728493, 9.723142416557037, 7.098321803776386,
        9.840350192746843, 4.313637177768209, 4.711067393958396, 4.980373575627846, 11.514259974581066,
        7.021679742635751, 7.086406482774657, 6.866554591327899, 13.860465376397686, 9.000651888199306,
        7.466942558165568, 6.285797264055683, 5.344936570504479, 4.604596319689401, 6.79851564777787,
        6.57531153075814, 4.338862930268401, 12.533334494419746, 5.356467224487618, 5.8842808210761435,
        5.288510786226977, 14.095719780336717, 4.590266554830692, 7.555099118530865, 6.743867474874785,
        3.050368733379032, 8.185393482248392, 8.748698069666819, 1.7844857874620714, 3.423603393780838,
        12.798354559678907, 6.489245742789474, 9.037941502315661, 3.126446685812329, 5.1766850854735385,
        4.187807074716468, 12.721319964499255, 5.250964576747151, 11.154184194171872, 2.569779945786857,
        4.86636854547856, 8.390830133904219, 6.143715216968551, 2.0878135999672733, 7.000466871820641,
        11.773542527894218, 8.188880971513637, 8.667634913032195, 9.001779517931292, 5.447910715580929,
        9.700256204911005, 10.266156774664267, 2.333108783274365, 10.979745901071052, 12.400766312441377,
        10.867021158137534, 8.915712569285771, 10.945003320286869, 8.489994198739621, 6.377657221579544,
        3.6433404493888792, 8.069576339984419, 7.959975436217489, 9.84934475473522, 2.7118487516797023,
        7.767155598723137, 20.748205561344225, 2.1720219621160566, 16.191231735251236, 22.403526583717756,
        43.32542232802105, 104.12173900881072, 224.43245086482733, 56.29696994568694, 26.666214745641486,
        28.635308906344775, 24.792999830044465, 8.416974636297967, 5.859009540167506, 9.398903585582165,
        9.235696597897933, 9.153065109106478, 3.010014383383747, 2.117456615302786, 2.7654154126281747,
        9.261159962153192, 2.2818760096950013, 1.9457162524089764, 12.978407518983543, 4.725142266145814,
        9.05924843501839, 7.115479435715414, 1.1784299186522058, 2.276532450899828, 4.855222093478923,
        9.966122028555372, 2.7829461612461515, 5.744550652061769, 8.343997056973583, 6.321423163043981,
        5.161421695519462, 9.13396917007437, 6.356507383779143, 2.8056336603523473, 1.6647966583846847,
        5.881498770425479, 10.837193562102492, 1.6227207775479404, 5.321170670739731, 6.931989965943509,
        2.995279549829016, 7.582539987550265, 6.087438930123727, 1.4373195884703451, 3.6413058004609695,
        5.527899300443217, 5.7545767438563065, 10.666656664976308, 5.98695455741838, 4.460855817497728,
        12.032926932119333, 6.059813492018003, 0.18980488372145798, 5.221693923367182, 3.555303137702171,
        3.4094915053412964, 1.228017407365452, 9.58228375481037, 6.645433042904449, 3.209534419567104,
        2.8844570386797552, 4.870101458242136, 5.71357774965143, 0.7386651251445506, 7.838054917728727,
        2.229802613884069, 9.49180419949943, 9.393522208421006, 3.9038400082457225, 3.8494437269558954,
        4.416374255912961, 5.860154808666351, 3.736037835876917, 2.3699155790911957, 11.07078928064166,
        11.3779068338214, 8.64826415084507, 4.895945285549557, 5.85395746269374, 3.601035608369106,
        0.7033132529008724, 3.3745267756972854, 5.233710811463715, 5.2389983555188255, 4.105768542431183,
        11.810723240182314, 10.381591056589528, 4.0606575578460635, 5.153949870800059, 2.7556224108612963,
        6.808411015161389, 4.665953272645106, 5.3837194188933095, 0.422718469761599, 7.75450336056405,
        7.341015543894748, 2.0793250514008084, 11.182306957292425, 11.017904786329616, 7.528356743855399,
        11.749739119008867, 8.913139817535656, 3.56611021475958, 1.7072808870224345, 10.532210601803298,
        12.431955066356032, 19.21086741408344, 25.43920805507547, 99.67485496155595, 49.10645932054934,
        19.203288803011915, 15.814700543390213, 28.476453582611708, 10.064653349399125, 8.937856097987014,
        5.717093312178105, 5.894307309573993, 8.285008827901473, 12.094072266025666, 15.688814086369394,
        6.398356269097806, 5.809347443483853, 6.7222342689485, 8.1749050112284, 4.8566083769005,
        2.2128257577467423, 9.088777079992632, 7.388588676317746, 6.344415883302472, 4.814189569493901,
        4.012884156669958, 4.432773941259573, 10.086660399222994, 7.885790875663056, 5.540001876850469,
        4.86151203937815, 16.571618406823585, 4.324448512794881, 2.3076259772736742, 4.304503743938277,
        11.363039458063437, 8.302251677444021, 5.562851326472508, 1.6913114570170862, 2.56248762236485,
        11.150618270608891, 7.1458081523380805, 10.348182624653901, 4.232395287396564, 4.684995352336269,
        7.504513516443143, 11.019999999999996, 7.50451351644314, 4.68499535233627, 4.2323952873965665,
        10.348182624653903, 7.145808152338088, 11.150618270608891, 2.562487622364849, 1.6913114570170862,
        5.562851326472512, 8.302251677444024, 11.363039458063422, 4.304503743938282, 2.307625977273685,
        4.324448512794881, 16.571618406823585, 4.861512039378153, 5.540001876850471, 7.88579087566306,
        10.086660399222994, 4.432773941259572, 4.0128841566699816, 4.814189569493904, 6.344415883302461,
        7.388588676317746, 9.088777079992632, 2.2128257577467423, 4.856608376900498, 8.174905011228402,
        6.722234268948501, 5.80934744348386, 6.398356269097808, 15.688814086369394, 12.094072266025673,
        8.28500882790147, 5.894307309573997, 5.717093312178106, 8.937856097987014, 10.064653349399128,
        28.476453582611704, 15.814700543390213, 19.203288803011915, 49.10645932054934, 99.67485496155595,
        25.43920805507547, 19.210867414083452, 12.43195506635603, 10.532210601803296, 1.7072808870224354,
        3.5661102147595867, 8.913139817535649, 11.74973911900887, 7.528356743855397, 11.017904786329604,
        11.182306957292417, 2.0793250514008057, 7.341015543894749, 7.754503360564049, 0.4227184697615971,
        5.3837194188933175, 4.665953272645106, 6.808411015161397, 2.7556224108612914, 5.15394987080006,
        4.0606575578460635, 10.38159105658953, 11.810723240182314, 4.10576854243119, 5.238998355518827,
        5.233710811463707, 3.374526775697283, 0.7033132529008715, 3.601035608369107, 5.853957462693741,
        4.895945285549549, 8.648264150845046, 11.377906833821399, 11.070789280641666, 2.369915579091201,
        3.7360378358769117, 5.860154808666351, 4.41637425591296, 3.8494437269559, 3.9038400082457305,
        9.393522208421006, 9.491804199499414, 2.229802613884066, 7.838054917728727, 0.7386651251445542,
        5.713577749651419, 4.870101458242135, 2.8844570386797623, 3.2095344195671047, 6.645433042904454,
        9.582283754810371, 1.228017407365453, 3.4094915053412964, 3.555303137702171, 5.221693923367184,
        0.1898048837214487, 6.059813492018004, 12.032926932119336, 4.460855817497728, 5.986954557418387,
        10.66665666497631, 5.754576743856305, 5.527899300443194, 3.6413058004609145, 1.4373195884703518,
        6.087438930123725, 7.5825399875502635, 2.995279549829017, 6.931989965943515, 5.321170670739731,
        1.622720777547941, 10.837193562102486, 5.881498770425484, 1.6647966583847043, 2.8056336603523446,
        6.35650738377915, 9.133969170074371, 5.16142169551946, 6.321423163043979, 8.343997056973578,
        5.744550652061767, 2.7829461612461475, 9.966122028555377, 4.855222093478918, 2.276532450899828,
        1.1784299186521978, 7.115479435715411, 9.059248435018393, 4.7251422661458164, 12.97840751898354,
        1.9457162524089715, 2.281876009695001, 9.261159962153192, 2.765415412628177, 2.117456615302791,
        3.0100143833837434, 9.153065109106477, 9.235696597897936, 9.398903585582165, 5.859009540167502,
        8.416974636297967, 24.792999830044455, 28.635308906344772, 26.66621474564148, 56.29696994568693,
        224.43245086482727, 104.12173900881068, 43.32542232802105, 22.403526583717753, 16.191231735251232,
        2.1720219621160544, 20.74820556134423, 7.767155598723135, 2.7118487516797076, 9.849344754735226,
        7.959975436217487, 8.069576339984419, 3.643340449388873, 6.377657221579546, 8.489994198739621,
        10.945003320286864, 8.915712569285777, 10.867021158137536, 12.400766312441382, 10.979745901071052,
        2.3331087832743678, 10.266156774664267, 9.700256204911014, 5.44791071558093, 9.001779517931285,
        8.667634913032195, 8.188880971513635, 11.773542527894218, 7.000466871820637, 2.087813599967272,
        6.143715216968555, 8.390830133904212, 4.866368545478582, 2.569779945786863, 11.154184194171872,
        5.25096457674715, 12.721319964499255, 4.187807074716473, 5.176685085473538, 3.1264466858123314,
        9.037941502315665, 6.489245742789474, 12.798354559678907, 3.423603393780838, 1.7844857874620685,
        8.748698069666814, 8.18539348224839, 3.050368733379031, 6.743867474874786, 7.555099118530863,
        4.5902665548307, 14.095719780336715, 5.288510786226979, 5.884280821076144, 5.356467224487619,
        12.533334494419748, 4.3388629302683945, 6.575311530758139, 6.798515647777874, 4.604596319689401,
        5.344936570504478, 6.285797264055681, 7.466942558165562, 9.000651888199306, 13.860465376397672,
        6.866554591327901, 7.086406482774649, 7.02167974263575, 11.514259974581066, 4.980373575627846,
        4.711067393958374, 4.313637177768207, 9.840350192746838, 7.098321803776385, 9.723142416557033,
        13.60538194728493, 11.449984513075114, 9.424740173697614, 13.872937970664982, 12.321962550506981,
        25.262384765193392, 28.357729704448698, 26.389790337580997, 52.50403209902303, 87.64924064192853,
        206.5801802555478, 420.33424624894946, 107.68010181319585, 65.9939929384324, 49.58548310981854,
        35.18323800616317, 31.370829132217693, 21.51897520564369, 21.187690623031173, 21.790148132170263,
        13.863682445500219, 19.18120806182191, 14.204430391572746, 10.264922798704928, 19.56678037253717,
        16.87980232803245, 20.714200865357476, 6.620469479950307, 6.490815268487634, 11.89103142389656,
        17.176481734847524, 16.375963116673706
    };

    public readonly double[] NumpyRFFTabs =
    {
        71.52, 16.3759631166737, 17.176481734847524, 11.89103142389656, 6.4908152684876335, 6.620469479950308,
        20.71420086535747, 16.87980232803245, 19.566780372537178, 10.264922798704927, 14.204430391572751,
        19.181208061821913, 13.863682445500217, 21.79014813217026, 21.187690623031177, 21.518975205643684,
        31.370829132217686, 35.183238006163165, 49.58548310981855, 65.9939929384324, 107.68010181319583,
        420.33424624894946, 206.58018025554773, 87.64924064192853, 52.50403209902302, 26.389790337580994,
        28.357729704448705, 25.262384765193374, 12.321962550506981, 13.872937970664978, 9.424740173697618,
        11.449984513075103, 13.60538194728493, 9.723142416557032, 7.098321803776382, 9.840350192746838,
        4.313637177768211, 4.7110673939583885, 4.980373575627845, 11.514259974581066, 7.021679742635751,
        7.08640648277466, 6.866554591327911, 13.860465376397691, 9.000651888199313, 7.4669425581655595,
        6.285797264055677, 5.344936570504475, 4.604596319689401, 6.798515647777874, 6.5753115307581425,
        4.338862930268393, 12.53333449441974, 5.3564672244876235, 5.884280821076148, 5.288510786226987,
        14.095719780336717, 4.590266554830692, 7.555099118530864, 6.743867474874782, 3.0503687333790346,
        8.18539348224839, 8.748698069666814, 1.7844857874620679, 3.423603393780838, 12.79835455967891,
        6.489245742789478, 9.037941502315658, 3.1264466858123305, 5.176685085473531, 4.187807074716465,
        12.721319964499253, 5.250964576747152, 11.154184194171876, 2.569779945786855, 4.866368545478577,
        8.390830133904212, 6.143715216968561, 2.0878135999672742, 7.000466871820632, 11.773542527894218,
        8.188880971513635, 8.667634913032199, 9.001779517931295, 5.447910715580932, 9.70025620491102,
        10.266156774664264, 2.3331087832743767, 10.97974590107105, 12.400766312441384, 10.867021158137531,
        8.915712569285777, 10.945003320286865, 8.489994198739625, 6.3776572215795415, 3.643340449388877,
        8.069576339984417, 7.959975436217489, 9.849344754735219, 2.7118487516797045, 7.767155598723139,
        20.748205561344236, 2.1720219621160557, 16.191231735251232, 22.40352658371776, 43.32542232802105,
        104.12173900881068, 224.43245086482736, 56.29696994568694, 26.666214745641486, 28.635308906344775,
        24.792999830044458, 8.416974636297965, 5.859009540167506, 9.398903585582167, 9.235696597897933,
        9.153065109106478, 3.010014383383727, 2.1174566153027894, 2.7654154126281765, 9.261159962153192,
        2.2818760096950044, 1.9457162524089768, 12.97840751898355, 4.725142266145814, 9.059248435018397,
        7.115479435715414, 1.1784299186522078, 2.276532450899828, 4.8552220934789165, 9.966122028555375,
        2.782946161246148, 5.744550652061767, 8.343997056973572, 6.321423163043973, 5.161421695519457,
        9.13396917007437, 6.3565073837791415, 2.8056336603523486, 1.6647966583846903, 5.881498770425479,
        10.837193562102486, 1.6227207775479395, 5.321170670739733, 6.93198996594351, 2.9952795498290197,
        7.582539987550256, 6.087438930123729, 1.4373195884703445, 3.6413058004609193, 5.52789930044323,
        5.754576743856303, 10.666656664976308, 5.986954557418383, 4.460855817497731, 12.032926932119327,
        6.059813492018004, 0.18980488372145057, 5.221693923367185, 3.5553031377021775, 3.409491505341295,
        1.2280174073654535, 9.582283754810367, 6.645433042904453, 3.209534419567104, 2.8844570386797455,
        4.870101458242133, 5.71357774965143, 0.7386651251445491, 7.838054917728718, 2.2298026138840648,
        9.491804199499436, 9.393522208421007, 3.903840008245731, 3.8494437269558985, 4.416374255912964,
        5.860154808666351, 3.736037835876913, 2.369915579091197, 11.070789280641662, 11.377906833821399,
        8.64826415084506, 4.895945285549551, 5.8539574626937485, 3.6010356083691066, 0.7033132529008684,
        3.3745267756972828, 5.233710811463709, 5.238998355518824, 4.105768542431182, 11.810723240182318,
        10.381591056589535, 4.0606575578460635, 5.153949870800058, 2.755622410861297, 6.8084110151614,
        4.665953272645105, 5.3837194188933095, 0.42271846976159516, 7.754503360564052, 7.341015543894752,
        2.0793250514008066, 11.182306957292424, 11.017904786329598, 7.528356743855394, 11.749739119008863,
        8.913139817535654, 3.5661102147595827, 1.7072808870224345, 10.5322106018033, 12.43195506635603,
        19.210867414083438, 25.43920805507547, 99.67485496155595, 49.10645932054935, 19.20328880301192,
        15.814700543390213, 28.4764535826117, 10.064653349399125, 8.937856097987023, 5.717093312178104,
        5.894307309573996, 8.285008827901475, 12.094072266025668, 15.688814086369394, 6.3983562690978015,
        5.809347443483858, 6.722234268948505, 8.174905011228402, 4.856608376900498, 2.212825757746738,
        9.088777079992626, 7.388588676317748, 6.344415883302466, 4.814189569493895, 4.012884156669952,
        4.432773941259573, 10.086660399222993, 7.885790875663061, 5.540001876850466, 4.861512039378153,
        16.57161840682359, 4.324448512794884, 2.3076259772736796, 4.3045037439382785, 11.363039458063453,
        8.302251677444017, 5.562851326472513, 1.6913114570170844, 2.562487622364845, 11.150618270608891,
        7.145808152338075, 10.3481826246539, 4.23239528739656, 4.684995352336271, 7.504513516443146,
        11.019999999999996
    };
}